import { axios } from '@/utils/request'
// 发票申请
export function getWaitTablePage(parameter) {
  return axios({
    url: '/sys/hr/invoice/order/pageInvoiceOrder',
    method: 'post',
    data: parameter
  })
}
export function getInvoiceTablePage(parameter) {
  return axios({
    url: '/sys/hr/invoice/pageInvoice',
    method: 'post',
    data: parameter
  })
}
export function invoiceCalcTax(parameter) {
  return axios({
    url: '/sys/hr/invoice/calcTax',
    method: 'post',
    data: parameter
  })
}
export function invoiceApplyInfoLoad(parameter) {
  return axios({
    url: '/sys/hr/invoice/order/invoiceApplyInfoLoad',
    method: 'post',
    data: parameter
  })
}
export function invoiceApplyQuery(id) {
  return axios({
    url: `/sys/hr/invoice/query/${id}`,
    method: 'get',
  })
}
export function submitInvoiceApply(parameter) {
  return axios({
    url: '/sys/hr/invoice/apply',
    method: 'post',
    data: parameter,
  })
}

// 发票抬头
export function getTitleTablePage(parameter) {
  return axios({
    url: '/sys/hr/invoice/title/page',
    method: 'post',
    data: parameter
  })
}
export function invoiceTitleQuery(id) {
  return axios({
    url: `/sys/hr/invoice/title/query/${id}`,
    method: 'get'
  })
}
export function invoiceTitleAdd(parameter) {
  return axios({
    url: '/sys/hr/invoice/title/add',
    method: 'post',
    data: parameter
  })
}
export function invoiceTitleUpdate(parameter) {
  return axios({
    url: '/sys/hr/invoice/title/update',
    method: 'post',
    data: parameter
  })
}
export function invoiceTitleDelete(parameter) {
  return axios({
    url: '/sys/hr/invoice/title/delete',
    method: 'post',
    data: parameter
  })
}
export function invoiceTitleSetDefault(parameter) {
  return axios({
    url: '/sys/hr/invoice/title/setDefault',
    method: 'post',
    data: parameter
  })
}
// 邮寄地址
export function getMailTablePage(parameter) {
  return axios({
    url: '/sys/hr/invoice/mail/page',
    method: 'post',
    data: parameter
  })
}
export function invoiceMailQuery(id) {
  return axios({
    url: `/sys/hr/invoice/mail/query/${id}`,
    method: 'get'
  })
}
export function invoiceMailAdd(parameter) {
  return axios({
    url: '/sys/hr/invoice/mail/add',
    method: 'post',
    data: parameter
  })
}
export function invoiceMailUpdate(parameter) {
  return axios({
    url: '/sys/hr/invoice/mail/update',
    method: 'post',
    data: parameter
  })
}
export function invoiceMailDelete(parameter) {
  return axios({
    url: '/sys/hr/invoice/mail/delete',
    method: 'post',
    data: parameter
  })
}
export function invoiceMailSetDefault(parameter) {
  return axios({
    url: '/sys/hr/invoice/mail/setDefault',
    method: 'post',
    data: parameter
  })
}
// 发票审核
export function pageInvoiceStatistics(parameter) {
  return axios({
    url: '/sys/hr/invoice/statistics/pageInvoiceStatistics',
    method: 'post',
    data: parameter
  })
}
// 发票审核详情
export function pageInvoiceCheck(parameter) {
  return axios({
    url: '/sys/hr/invoice/pageInvoiceCheck',
    method: 'post',
    data: parameter
  })
}
export function listHrInvoiceCategory(parameter) {
  return axios({
    url: '/sys/hr/invoice/listHrInvoiceCategory',
    method: 'get'
  })
}
export function checkInvoice(parameter) {
  return axios({
    url: '/sys/hr/invoice/checkInvoice',
    method: 'post',
    data: parameter
  })
}
export function invoiceFileList(id) {
  return axios({
    url: `/sys/hr/invoice/file/list/${id}`,
    method: 'get'
  })
}
export function invoiceFileAdd(parameter) {
  return axios({
    url: '/sys/hr/invoice/file/add',
    method: 'post',
    data: parameter
  })
}
export function invoiceFileDelete(parameter) {
  return axios({
    url: '/sys/hr/invoice/file/delete',
    method: 'post',
    data: parameter
  })
}